home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_groff.idb / usr / freeware / share / groff / 1.17.2 / tmac / mdoc / doc-ditroff.z / doc-ditroff
Text File  |  2002-04-08  |  5KB  |  213 lines

  1. .\" Copyright (c) 1991, 1993
  2. .\"    The Regents of the University of California.  All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"      This product includes software developed by the University of
  15. .\"      California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"     @(#)doc-ditroff    8.1 (Berkeley) 06/08/93
  33. .\"
  34. .eo
  35. .if !r C .nr C 0
  36. .if !r D .nr D 0
  37. .if !r cR .nr cR 0
  38. .if !r S .nr S 10
  39. .ec
  40. .ie        (\n[S] == 11) \{\
  41. .ps 10.95z
  42. .vs 13.6p
  43. .\}
  44. .el \{ .ie (\n[S] == 12) \{\
  45. .ps 12z
  46. .vs 14.5p
  47. .\}
  48. .el \{\
  49. .ps 10z
  50. .vs 12p
  51. .\}\}
  52. .ds caption-font \f[R]\s[\n[.ps]u]
  53. .ds caption-font2 \f[R]\s[\n[.ps]u]
  54. .ds Ad-font \f[I]\s[\n[.ps]u]
  55. .ds Ar-font \f[CO]\s[\n[.ps]u]
  56. .ds Cm-font \f[CB]\s[\n[.ps]u]
  57. .ds Em-font \f[I]\s[\n[.ps]u]
  58. .ds Er-font \f[C]\s[\n[.ps]u]
  59. .ds Ev-font \f[C]\s[\n[.ps]u]
  60. .ds Fa-font \f[CO]\s[\n[.ps]u]
  61. .ds Fd-font \f[CB]\s[\n[.ps]u]
  62. .ds Fl-font \f[CB]\s[\n[.ps]u]
  63. .ds Fn-font \f[CB]\s[\n[.ps]u]
  64. .ds Ft-font \f[CO]\s[\n[.ps]u]
  65. .ds Ic-font \f[CB]\s[\n[.ps]u]
  66. .ds Li-font \f[C]
  67. .ds Me-font \f[B]\s[\n[.ps]u]
  68. .ds Nm-font \f[CB]\s[\n[.ps]u]
  69. .ds No-font \f[R]\s[\n[.ps]u]
  70. .ds Pa-font \f[C]\s[\n[.ps]u]
  71. .ds Sh-font \f[B]\s[\n[.ps]u]
  72. .ds Sy-font \f[B]\s[\n[.ps]u]
  73. .ds Sx-font \f[B]\s[\n[.ps]u]
  74. .ds Tn-font-shape \f[R]
  75. \# XXX: adapt to discrete LaTeX font sizes
  76. .ds Tn-font-size \s[(\n[.ps]u - 1z)]
  77. .ds Va-font \f[I]\s[\n[.ps]u]
  78. .ds Xr-font \f[C]\s[\n[.ps]u]
  79. .ds left-parenthesis \f[R]\|(\|\f[P]\s[\n[.ps]u]
  80. .ds right-parenthesis \f[R]\|)\|\f[P]\s[\n[.ps]u]
  81. .ds lp \f[R](\f[P]\s[\n[.ps]u]
  82. .ds rp \f[R])\f[P]\s[\n[.ps]u]
  83. .ds left-bracket \f[R]\^[\^\f[P]\s[\n[.ps]u]
  84. .ds right-bracket \f[R]\^]\f[P]\s[\n[.ps]u]
  85. .tr *\[**]
  86. .nr subheader-indent (\w\f[C],u * 5u)
  87. .nr paragraph-space .5v
  88. .nr digit-width \w'\0'u
  89. .nr fixed-width \w\f[C]0
  90. .eo
  91. .nr header-space 0
  92. .nr footer-space 0
  93. .nr display-vertical 0
  94. .de setup-page-layout
  95. .nr header-space .5i
  96. .nr footer-space .5i
  97. .ll 6.5i
  98. .lt 6.5i
  99. .po 1i
  100. .nr display-vertical .5v
  101. ..
  102. .ds left-singlequote \[oq]
  103. .ds right-singlequote \[cq]
  104. .ds <= \[<=]
  105. .ds >= \[>=]
  106. .ds Lq \[lq]
  107. .ds Rq \[rq]
  108. .ds ua \[ua]
  109. .ds aa \[aa]
  110. .ds ga \[ga]
  111. .ds q \[dq]
  112. .ds Pi \[*p]
  113. .ds Ne \[!=]
  114. .ds Le \[<=]
  115. .ds Ge \[>=]
  116. .ds Lt <
  117. .ds Gt >
  118. .ds Pm \[+-]
  119. .ds If \[if]
  120. .ds Na \f[I]NaN\f[P]
  121. .ds Ba \f[R]|\f[P]
  122. .nr gX 0
  123. .ds header-string
  124. .de setup-header
  125. .ds header-string "\*[document-title]
  126. .if !"\*[section]"Null" \
  127. .as header-string \|(\*[section])
  128. .wh 0 header
  129. .wh -1.25i footer
  130. .nr nL \n[nl]
  131. .if \n[gX] \
  132. .ds command-name
  133. .br
  134. .if \n[nL] \
  135. .if !\n[C] \
  136. .nr % 1
  137. .nr gX 0
  138. .e@ end-macro
  139. ..
  140. .de get-width
  141. .nr width \w\f[C]\$1
  142. .ie (\n[width] >= \n[fixed-width]) \{\
  143. .ie (\n[width] % \n[fixed-width]) \
  144. .nr width ((\n[width] / \n[fixed-width]) + 1)
  145. .el \
  146. .nr width (\n[width] / \n[fixed-width])
  147. .\}
  148. .el \{\
  149. .ie \n[width] \
  150. .nr width 1
  151. .el \
  152. .nr width 0
  153. .\}
  154. ..
  155. .de get-arg-width
  156. .nr width \w\f[C]\*[arg\$1]
  157. .ie (\n[width] >= \n[fixed-width]) \{\
  158. .ie (\n[width] % \n[fixed-width]) \
  159. .nr width ((\n[width] / \n[fixed-width]) + 1)
  160. .el \
  161. .nr width (\n[width] / \n[fixed-width])
  162. .\}
  163. .el \{\
  164. .ie \n[width] \
  165. .nr width 1
  166. .el \
  167. .nr width 0
  168. .\}
  169. ..
  170. .de Ql
  171. .if !\n[arg-limit] \{\
  172. .ie \n[.$] \{\
  173. .ds macro-name Ql
  174. .parse-args \$@
  175. .\}
  176. .el \
  177. .tm Usage: .Ql argument ... (#\n[.c])
  178. .\}
  179. .nr reg-Ql (\n[arg-ptr] + 1)
  180. .get-arg-width \n[reg-Ql]
  181. .nr reg-Ql +1
  182. .if (\n[arg-limit] >= \n[reg-Ql]) \
  183. .if (\n[type\n[reg-Ql]] == 2) \
  184. .nr width 3
  185. .ie (\n[width] > 2) \
  186. .Li
  187. .el \{\
  188. .ie \n[arg-ptr] \{\
  189. .ds arg\n[arg-ptr] Li
  190. .nr arg-ptr -1
  191. .\}
  192. .el \{\
  193. .nr reg-Ql \n[arg-limit]
  194. .nr reg-Ql1 (\n[arg-limit] + 1)
  195. .while \n[reg-Ql] \{\
  196. .rn arg\n[reg-Ql] arg\n[reg-Ql1]
  197. .rnn type\n[reg-Ql] type\n[reg-Ql1]
  198. .rn space\n[reg-Ql] space\n[reg-Ql1]
  199. .nr reg-Ql -1
  200. .nr reg-Ql1 -1
  201. .\}
  202. .ds arg1 Li
  203. .nr type1 1
  204. .ds space1
  205. .nr arg-limit +1
  206. .\}
  207. .ds quote-left "\*[left-singlequote]
  208. .ds quote-right "\*[right-singlequote]
  209. .enclose-string
  210. .\}
  211. ..
  212. .ec
  213.